package com.briup.myblog.service.impl;


import com.briup.myblog.bean.basic.BaseLog;
import com.briup.myblog.dao.ext.BaseLogMapperExt;
import com.briup.myblog.service.IBaseLogService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class BaseLogServiceImpl implements IBaseLogService {
    @Autowired
    private BaseLogMapperExt mapperExt;

    @Override
    public PageInfo<BaseLog> pageQuery(int pageNum, int pageSize) {
        PageHelper.startPage(pageSize, pageNum, true);
        List<BaseLog> list = mapperExt.findBaseLog(pageSize, pageNum);
        return new PageInfo<>(list);
    }

}
